package org.example.service;

import org.example.dao.PlanRepository;
import org.example.model.PlanEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: wwy
 * @Date: 2020/12/3 13:59
 */
@Service
public class PlanService {
    @Autowired
    private PlanRepository planRepository;

    public void save(PlanEntity planEntity){
        planRepository.save(planEntity);
    }

    /**
     * 根据id删除
     * @param id
     */
    public void delete(Long id){
        planRepository.deleteById(id);
    }
}
